package xin.baizhiedu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 *  大屏当前周完成工单 （当前一周的）
 *  SELECT
 * 	A.TIMEEND ,COUNT(1) AS SUMNUMBER
 * FROM
 * 	(
 * 	SELECT
 * 		TO_CHAR(MAX( a.JOB_ACTUALENDTIME ), 'YYYY-MM-DD') as TIMEEND,
 * 		b.job_id
 * 	FROM
 * 		T_PLAN_JOB a,
 * 		( SELECT job_id FROM T_PLAN_JOB WHERE STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' AND JOB_TYPENAME = '订单' AND JOB_DIVISION = '1' ) b
 * 	WHERE
 * 		a.JOB_PID = b.job_id
 * 		AND a.JOB_ACTUALENDTIME IS NOT NULL
 * 		AND  TRUNC(a.JOB_ACTUALENDTIME) <= TRUNC( SYSDATE) -- 当前周的开始日期
 *
 * 		AND  TRUNC(a.JOB_ACTUALENDTIME) > TRUNC( SYSDATE)-7 -- 当前周的结束日期
 *
 * 	GROUP BY
 * 		b.job_id
 * 	) a  WHERE 1=1 GROUP BY A.TIMEEND ORDER BY  A.TIMEEND
 */
@Data
@TableName(value = "QG_JOB_WEEK", autoResultMap = true)
public class qgJobWeek implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 完工日期
     */
    @TableField(value = "TIMEEND")
    private String startTime;
    /**
     * 完工总和
     */
    @TableField(value = "SUMNUMBER")
    private Long total;

}
